import request from '@/api/request.js'

// 模板设置 获取下拉框数据
export const getSettingList = (params) => {
    return request({
        url: '/template/v_setList',
        method: 'GET',
        params
    })
}

// 模板设置 设置
export const settingModel = (params) => {
    return request({
        url: '/template/v_setting',
        method: 'GET',
        params
    })
}

// 模板设置 导出
export const exportModel = (data) => {
    return request({
        url: `/template/o_export?path=${data.path}&resPath=${data.resPath}&solution=${data.solution}`,
        method: 'POST',
        responseType: 'blob'
    })
}

// 模板设置 导出
export const importModel = (data, r) => {
    console.log(data, r)
    return request({
        url: `/template/o_import?path=${data.path}&resPath=${data.resPath}&source=${data.source}`,
        method: 'POST',
        data: r
    })
}
